package com.sfzlot.dev.netty.bean.data;

import com.sfzlot.dev.netty.bean.inf.Data;
import com.sfzlot.dev.netty.utils.ByteUtil;

/**
 * 设备更改服务器请求体
 * Created by pierr on 2017/5/30.
 */
public class DeviceServerInData implements Data {
    
    private String serverUrl;			// 服务器URL

    
	public String getServerUrl() {
		return serverUrl;
	}

	public void setServerUrl(String serverUrl) {
		this.serverUrl = serverUrl;
	}

	@Override
	public String toString() {
		return "DeviceServerInData [serverUrl=" + serverUrl 
				+ "]";
	}

	@Override
	public byte[] toBytes(){
		byte[] serverUrlBytes = ByteUtil.stringToByte(serverUrl, 64);
		return serverUrlBytes;
	}

	@Override
	public String transData() {
		return "DeviceServerInData(设备更改服务器请求体) [serverUrl=" + serverUrl
				+ "]";
	}
}
